<template>
  <el-date-picker
      v-model="id"
      ref="rangeDate"
      type="daterange"
      range-separator="至"
      start-placeholder="开始日期"
      end-placeholder="结束日期"
      @change="onChange">
  </el-date-picker>
</template>

<script>
export default {
  name: 'RangeDate',
  data () {
    return {
      id: +new Date()
    }
  },
  methods: {
    onChange (date, dateString) {
      this.$emit('change', dateString)
    },
    reset () {
      this.id = +new Date()
    }
  }
}
</script>
